// @ts-nocheck
import { request } from '@/request'

//管理员登录
export function login(data) {
    return request({
        url: '/admin/login',
        data: data,
        method: 'post',
    })
}
export function newsList(params) {
    return request({
        url: `index.php?action=articles_list`,
        params: params,  // 其他参数通过 params 传递
        method: 'get',
    })
}
export function codeListApi(data) {
    return request({
        url: '/spin/getCodeList',
        data: data,
        method: 'post',
    })
}
export function generateCodesApi(data) {
    return request({
        url: '/spin/generateCodes',
        data: data,
        method: 'post',
    })
}
export function deleteCodesApi(data) {
    return request({
        url: '/spin/deleteCodes',
        data: data,
        method: 'post',
    })
}
export function getPrizeConfigApi() {
    return request({
        url: '/lottery/getPrizeConfig',
        method: 'post',
    })
}
export function updateProbabilityApi(data) {
    return request({
        url: '/lottery/updateProbability',
        data: data,
        method: 'post',
    })
}
export function setPrizeConfigApi(data) {
    return request({
        url: '/lottery/setPrizeConfig',
        data: data,
        method: 'post',
    })
}
export function getPrizeRecordsApi(data) {
    return request({
        url: '/lottery/getWinRecords',
        data: data,
        method: 'post',
    })
}
export function updateDeliverStatusApi(data) {
    return request({
        url: '/lottery/markAsDelivered',
        data: data,
        method: 'post',
    })
}
export function deletePrizeRecordApi(data) {
    return request({
        url: '/lottery/deletePrizeRecord',
        data: data,
        method: 'post',
    })
}
export function createArticle(data) {
    return request({
        url: 'index.php?action=articles_create',
        data: data,
        method: 'post',
    })
}
export function getArticle(params) {
    return request({
        url: `index.php?action=articles_detail`,
        params: params,  // 其他参数通过 params 传递
        method: 'get',
    })
}